class Config:
    """
    应用配置类
    """
    # Shopify API配置 - 默认开发环境值
    SHOPIFY_API_VERSION = "2024-04"  # 使用最新的API版本
    SHOPIFY_API_KEY = "dev_test_key"
    SHOPIFY_API_SECRET = "dev_test_secret"
    SHOPIFY_SCOPES = [
        "read_products", "write_products",
        "read_customers", "write_customers",
        "read_orders", "write_orders",
        "read_themes", "write_themes",
        "read_script_tags", "write_script_tags"
    ]
    SHOPIFY_ADMIN_API_ENDPOINT = "https://{shop_domain}/admin/api/{api_version}/"
    SHOPIFY_STOREFRONT_API_ENDPOINT = "https://{shop_domain}/api/{api_version}/graphql.json"
    
    # 翻译服务配置
    TRANSLATE_API_KEY = "YOUR_TRANSLATE_API_KEY"  # 翻译服务API密钥
    META_FIELD_NAMESPACE = "translate_app"  # 默认的metafield命名空间
    META_FIELD_KEY_PREFIX = "translated_"  # 翻译metafield的key前缀
    
    # 支持的语言列表
    SUPPORTED_LANGUAGES = ["en", "fr", "de", "es", "zh", "ja", "ko"]
    
    # 限流配置
    RATE_LIMIT_PER_MINUTE = 60
    
    # 重试配置
    RETRY_ATTEMPTS = 3
    RETRY_BACKOFF_FACTOR = 0.3
    RETRY_DELAY_SECONDS = 2
    MAX_CONCURRENT_TRANSLATIONS = 5
    API_TIMEOUT = 30
    
    # 用户权限配置
    REQUIRE_PREMIUM_FOR_BULK = False  # 是否需要高级版才能使用批量翻译
    
    # 数据库配置
    DB_HOST = "localhost"
    DB_PORT = 3306
    DB_USER = "root"
    DB_PASSWORD = "password"
    DB_NAME = "shopify_translate_app"
    
    # 缓存配置
    CACHE_TTL = 3600  # 缓存有效期（秒）
    
    # 应用配置
    APP_NAME = "Shopify Translate App"
    APP_VERSION = "1.0.0"
    DEBUG = True  # 生产环境需要设置为False
    
    # 积分配置
    TRANSLATION_CREDITS_PER_CHAR = 0.01  # 每字符消耗的积分
    MIN_CREDITS_REQUIRED = 10  # 最低需要的积分